package com.musicserver.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.musicserver.model.domain.Banner;
import com.musicserver.service.BannerService;
import com.musicserver.mapper.BannerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author tch001
* @description 针对表【banner】的数据库操作Service实现
* @createDate 2025-09-22 15:02:07
*/
@Service
public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner>
    implements BannerService{

    @Autowired
    private BannerMapper bannerMapper;

    @Cacheable(value = "banner", key = "'list'")
    @Override
    public List<Banner> getAllBanner() {
        System.out.println("查询数据库");
        return bannerMapper.selectList(null);
    }
}




